package com.briup.day12;

import com.briup.day12.bean.Animal;
import com.briup.day12.bean.Dog;

/**
 * @author ThinkBook
 */
public class Test03_Animal {
    public static void main(String[] args) {
        Dog d = new Dog();
        d.showAge(30);
        d.show();

    }


    //基础继承测试
    public static void main01(String[] args) {
        Dog d =new Dog();
        d.setColor("黄色");
        d.setAge(2);
        d.setName("小黑");

        d.show();

        System.out.println("----------");

        //如果定义类时  没有明确指定 父类，则

        Animal a = new Animal();
        String str = a.toString();
        System.out.println(str);
    }
}
